function dayList(time) {//生成之前16天的日期
    var arr = time.split('-');
    var year = Math.floor(arr[0]), month = Math.floor(arr[1]), day = Math.floor(arr[2]);
    var day_line = getMonthDays(year,month-1);
    var arr_out = [],arr_show = [],arr_Use = [];
    for (var i=0; i<16; i++) {
        var day_temp = '';
        if(i>0){
            day--;
            if(day <=  0){
                day = day_line;
                month--;
                if(month <= 0){
                    month = 12;
                    year--;
                }
            }
        }
        arr_show[i] = Math.floor(month) +'/'+ Math.floor(day);

        if (day < 10 && !(day.length > 1)) {
            day =  '0' + day;
        }
        if (month < 10 && !(month.length > 1)) {
            month =  '0' + month;
        }

        day_temp =year+'-'+month+'-'+day;
        arr_out[i] = day_temp;

    }

    for(var k=0; k<16; k++){
        if(k%3==0){
            arr_Use[k] = arr_show[k];
        }else{
            arr_Use[k] = '';
        }
    }

    return {last16:arr_out.reverse(), ecShow:arr_show.reverse(), ecUse:arr_Use.reverse()};
}

function getMonthDays(year,month){//月份时间的获取
    //判断2月份天数
    if(month==2){
        days= (year%4==0)&&(year%100!=0)||(year%400==0)? 29:28;
    }else {
        //1-7月 单数月为31日
        if(month<7){
            days= month%2==1?31:30;
        }else {
            //8-12月 双月为31日
            days = month%2==0?31:30;
        }
    }
    return days;
}

function star_sun(name,code) {//评星
    $(name).find('b').each(function (key) {
        if(code>=(key+1)){//整颗星：不小于索引+1
            $(this).addClass('on');
        }else if((code-key)>0){//半颗星：小于索引+1，但大于索引
            $(this).addClass('on0');
        }
    });
}

